
package com.jiuqi.irs.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for tbDetailproof.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="tbDetailproofForm"
 */
public class TbDetailproofForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _dtGuid = null;
   private java.lang.String _proofId = null;
   private java.lang.String _itemCode = null;
   private java.lang.String _proofCode = null;
   private java.lang.String _nameNumber = null;
   private java.lang.String _itemName = null;
   private java.lang.String _measureUnit = null;
   private java.math.BigDecimal _quantity = null;
   private java.math.BigDecimal _money = null;
   private java.lang.String _tranFalg = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public TbDetailproofForm() {
   }

   /**
    * Returns the dtGuid
    *
    * @return the dtGuid
    */
   public java.lang.String getDtGuid() {
      return _dtGuid;
   }

   /**
    * Sets the dtGuid
    *
    * @param dtGuid the new dtGuid value
    */
   public void setDtGuid(java.lang.String dtGuid) {
      _dtGuid = dtGuid;
   }
   /**
    * Returns the proofId
    *
    * @return the proofId
    */
   public java.lang.String getProofId() {
      return _proofId;
   }

   /**
    * Sets the proofId
    *
    * @param proofId the new proofId value
    */
   public void setProofId(java.lang.String proofId) {
      _proofId = proofId;
   }
   /**
    * Returns the itemCode
    *
    * @return the itemCode
    */
   public java.lang.String getItemCode() {
      return _itemCode;
   }

   /**
    * Sets the itemCode
    *
    * @param itemCode the new itemCode value
    */
   public void setItemCode(java.lang.String itemCode) {
      _itemCode = itemCode;
   }
   /**
    * Returns the proofCode
    *
    * @return the proofCode
    */
   public java.lang.String getProofCode() {
      return _proofCode;
   }

   /**
    * Sets the proofCode
    *
    * @param proofCode the new proofCode value
    */
   public void setProofCode(java.lang.String proofCode) {
      _proofCode = proofCode;
   }
   /**
    * Returns the nameNumber
    *
    * @return the nameNumber
    */
   public java.lang.String getNameNumber() {
      return _nameNumber;
   }

   /**
    * Sets the nameNumber
    *
    * @param nameNumber the new nameNumber value
    */
   public void setNameNumber(java.lang.String nameNumber) {
      _nameNumber = nameNumber;
   }
   /**
    * Returns the itemName
    *
    * @return the itemName
    */
   public java.lang.String getItemName() {
      return _itemName;
   }

   /**
    * Sets the itemName
    *
    * @param itemName the new itemName value
    */
   public void setItemName(java.lang.String itemName) {
      _itemName = itemName;
   }
   /**
    * Returns the measureUnit
    *
    * @return the measureUnit
    */
   public java.lang.String getMeasureUnit() {
      return _measureUnit;
   }

   /**
    * Sets the measureUnit
    *
    * @param measureUnit the new measureUnit value
    */
   public void setMeasureUnit(java.lang.String measureUnit) {
      _measureUnit = measureUnit;
   }
   /**
    * Returns the quantity
    *
    * @return the quantity
    */
   public java.math.BigDecimal getQuantity() {
      return _quantity;
   }

   /**
    * Sets the quantity
    *
    * @param quantity the new quantity value
    */
   public void setQuantity(java.math.BigDecimal quantity) {
      _quantity = quantity;
   }
   /**
    * Returns the money
    *
    * @return the money
    */
   public java.math.BigDecimal getMoney() {
      return _money;
   }

   /**
    * Sets the money
    *
    * @param money the new money value
    */
   public void setMoney(java.math.BigDecimal money) {
      _money = money;
   }
   /**
    * Returns the tranFalg
    *
    * @return the tranFalg
    */
   public java.lang.String getTranFalg() {
      return _tranFalg;
   }

   /**
    * Sets the tranFalg
    *
    * @param tranFalg the new tranFalg value
    */
   public void setTranFalg(java.lang.String tranFalg) {
      _tranFalg = tranFalg;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getDtGuid() == null) {
         errors.add("dtGuid", new ActionError("error.dtGuid.required"));
      }
      if(getProofId() == null) {
         errors.add("proofId", new ActionError("error.proofId.required"));
      }
      if(getItemCode() == null) {
         errors.add("itemCode", new ActionError("error.itemCode.required"));
      }
      // TODO test format/data
      return errors;
   }
}
